package com.shujia.control;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller // 添加该注释后 当前类中方法返回值为调用页面的名称
public class PageControllerDemo {

    @RequestMapping("index")
    public String getIndex(){
        System.out.println("this is getIndex...");
        return "index"; // 调用webapp目录中的index.jsp页面
    }
}
